-- stack: in.6 -- format: 8 (HyperCard 1) -- flags: 0x5000 (can't delete) -- protect password hash: 0 -- maximum user level: 5 (scripting) -- window: Rect(x1=0, y1=0, x2=0, y2=0) -- screen: Rect(x1=0, y1=0, x2=0, y2=0) -- card dimensions: w=0 h=0 -- scroll: x=0 y=0 -- background count: 3 -- first background id: 30235 -- card count: 5 -- first card id: 136442 -- list block id: 2516 -- print block id: 7263 -- font table block id: 0 -- style table block id: 0 -- free block count: 0 -- free size: 0 bytes -- total size: 67360 bytes -- stack block size: 24064 bytes -- created by hypercard version: 0x01208000 -- compacted by hypercard version: 0x01258000 -- modified by hypercard version: 0x01258000 -- opened by hypercard version: 0x01258000 -- patterns[0]: 0x0000000000000000 -- patterns[1]: 0x8000000008000000 -- patterns[2]: 0x8800220088002200 -- patterns[3]: 0x8888222288882222 -- patterns[4]: 0x88AA22AA88AA22AA -- patterns[5]: 0xCCAA33AACCAA33AA -- patterns[6]: 0xEEAABBAAEEAABBAA -- patterns[7]: 0xEEBBBBEEEEBBBBEE -- patterns[8]: 0xFFBBFFEEFFBBFFEE -- patterns[9]: 0xFFBBFFFFFFBBFFFF -- patterns[10]: 0x8010022001084004 -- patterns[11]: 0xFFFFFFFFFFFFFFFF -- patterns[12]: 0x8822882288228822 -- patterns[13]: 0x1122448811224488 -- patterns[14]: 0xC4800C6843023026 -- patterns[15]: 0xB130031BD8C00C8D -- patterns[16]: 0xAA00AA00AA00AA00 -- patterns[17]: 0x8822552288225522 -- patterns[18]: 0x8855225588552255 -- patterns[19]: 0x77DD77DD77DD77DD -- patterns[20]: 0x8000000000000000 -- patterns[21]: 0xAA55AA55AA55AA55 -- patterns[22]: 0x038448300C020101 -- patterns[23]: 0x8244394482010101 -- patterns[24]: 0x8814224188412214 -- patterns[25]: 0x8080413E080814E3 -- patterns[26]: 0x22048C7422179810 -- patterns[27]: 0xBE808808EB088880 -- patterns[28]: 0x25C8328964244C92 -- patterns[29]: 0xA29C41BE2AC914EB -- patterns[30]: 0x40A00000040A0000 -- patterns[31]: 0x8040200002040800 -- patterns[32]: 0xAA00800088008000 -- patterns[33]: 0xFF80808080808080 -- patterns[34]: 0x081C22C180010204 -- patterns[35]: 0xFF808080FF080808 -- patterns[36]: 0xF87422478F172271 -- patterns[37]: 0xBF00BFBFB0B0B0B0 -- patterns[38]: 0xFF7FBE5DA2418000 -- patterns[39]: 0xFAF5FAF5A050A050 -- checksum: 0x0 ----- HyperTalk script ----- on openStack global var, fn, MarkedCard, menu1, menu2, TextArrowStatus if the version < 1.2 then answer "This stack needs HyperCard version 1.2." doMenu "Quit HyperCard" end if set cursor to 4 set userlevel to 5 hide msg set blindTyping to true set textArrows to false put "off" into TextArrowStatus put NewMenu("Articles","About Ref Tracker.../?", "(-","Find Again/A","Store This Article/S", "Go to Stored Article/G", "(-","To Clipboard/K", "(-","To Disk/D","Close Disk File", "(-","Read In Articles/I","Write Out Articles/W") into menu1 put NewMenu("Operations","Clear Special Clipboard", "Write Clipboard To Disk","Text Arrows/5","(-", "Delete This Card/L","Make A New Card/Y", "(-","Sort The Stack/J","Compact The Stack/U", "Eliminate Duplicates/E") into menu2 global toBeFound if toBeFound is empty then EnableMenu 1, 3, false EnableMenu 1, 10, false EnableMenu 2, 2, false global screenSize put item 2 of the screenRect into screenTop if top of card window > screenTop + 20 then put "big" into screenSize titleBar hide put empty into tempFieldScript set loc of msg to 22,366 else put "small" into screenSize hide menuBar put "on mouseEnter" & return into tempFieldScript put "show menuBar" & return after tempFieldScript put "end mouseEnter" & return & return after tempFieldScript put "on mouseLeave" & return after tempFieldScript put "hide menuBar" & return after tempFieldScript put "end mouseLeave" & return after tempFieldScript set loc of msg to 22,300 end if set lockScreen to true set the script of bkgnd field id 85 of cd 2 to tempFieldScript set the name of bkgnd button id 79 of cd 2 to "Author" set hilite of bkgnd button id 88 of cd 2 to false put empty into cd field "HoldingArea" of cd "Help Card" set lockScreen to false put "" into var put "" into fn put the number of cds of bkgnd id 30235 into cd field "number of cards" of cd "Help Card" put cd field id 16 of cd "Help Card" into MarkedCard end openStack on openCard global tempThing, exempt hide msg if the short name of this cd is "Help Card" or the short name of this cd is "TitleCard" or exempt is "Yes" then put "No" into exempt exit openCard end if put tempThing into bkgnd field id 80 end openCard on closeCard global PriorCard, tempThing put the short name of this cd into PriorCard screenCheck if the short name of this cd is "Help Card" or the short name of this cd is "TitleCard" then exit closeCard end if put bkgnd field "Thing" into tempThing put empty into bkgnd field id 80 end closeCard on closeStack set cursor to 4 put the number of cds of background id 30235 into cd field "number of cards" of cd "Help Card" global menu1, menu2 put DeleteMenu(menu1) into menu1 put DeleteMenu(menu2) into menu2 end closeStack on enterKey send mouseUp to bkgnd button id 81 end enterKey ------------------------------------------------------------------------ -- The “doMenu” routines Appear Below in Alphabetical Order -- ------------------------------------------------------------------------ on doMenu which if which is "About Ref Tracker..." then screenCheck AboutRefTracker else if which is "Back" then screenCheck DoBack else if which is "Clear Special Clipboard" then screenCheck clearClip else if which is "Close Disk File" then screenCheck CloseDiskFile else if which is "Compact The Stack" then screenCheck compactTheStack else if which is "Delete This Card" then screenCheck DoDeleteThisCard else if which is "Eliminate Duplicates" then screenCheck DoDeDup else if which is "Find..." then screenCheck send mouseUp to bkgnd button id 33 else if which is "Find Again" then screenCheck send mouseUp to bkgnd button id 72 else if which is "Go to Stored Article" then screenCheck set cursor to signal global MarkedCard visual effect dissolve go to MarkedCard else if which is "Help" then screenCheck AboutRefTracker else if which is "Last" then screenCheck set cursor to Signal go to last cd of this bkgnd else if which is "Make A New Card" then screenCheck DoMakeNewCard else if which is "Next" then screenCheck visual effect scroll left go next cd of this bkgnd else if which is "Prev" then screenCheck visual effect scroll right go prev cd of this bkgnd else if which is "Read In Articles" then screenCheck readInNewArticles else if which is "Sort The Stack" then screenCheck SortIt else if which is "Store This Article" then screenCheck set cursor to signal global MarkedCard put the name of this cd into MarkedCard put MarkedCard into cd field id 16 of cd "Help Card" wait 1 second else if which is "Text Arrows" then screenCheck adjustTextArrows else if which is "To Clipboard" then screenCheck send mouseUp to bkgnd button id 83 else if which is "To Disk" then screenCheck send mouseUp to bkgnd button id 40 else if which is "Write Clipboard To Disk" then screenCheck writeClipOut else if which is "Write Out Articles" then screenCheck PreliminaryWriteOut else if which is "MockWrite" or which is "Key Caps" or which is "DAleks" then pass doMenu else screenCheck pass doMenu end if end doMenu ------------------------------------------------------------------------ --Main Routines (other than doMenu) Appear Below in Alphabetical Order-- ------------------------------------------------------------------------ on AboutRefTracker answer "Reference Tracker Version 1.6" & return & " January 1st, 1990" & return & " © 1990 by Ian Neath" & return & " From Owl Software" with "Help" or "Ok" if it is "Help" then send mouseUp to bkgnd button id 41 end if end AboutRefTracker on adjustTextArrows global TextArrowStatus if TextArrowStatus is "on" then set cursor to TAoff put "off" into TextArrowStatus set textArrows to false CheckMenu 2, 3, false wait 1 sec else set cursor to TAon put "on" into TextArrowStatus set textArrows to true CheckMenu 2, 3, true wait 1 sec end if end adjustTextArrows on arrowKey whichKey global TextArrowStatus if TextArrowStatus is "on" then pass arrowKey else if whichKey is "up" and the optionKey is down then set cursor to signal global MarkedCard put the name of this cd into MarkedCard put MarkedCard into cd field id 16 of cd "Help Card" wait 1 second else if whichKey is "up" and the optionKey is not down then set cursor to signal global MarkedCard visual effect dissolve go to MarkedCard else if whichKey is "down" then set cursor to signal global PriorCard if PriorCard is empty or the name of this cd is "Help Card" or PriorCard is "Help Card" then exit arrowKey else visual effect dissolve go to PriorCard end if else if whichKey is "right" then go next cd of this bkgnd else if whichKey is "left" then go prev cd of this bkgnd end if end if end arrowKey on clearClip set cursor to 4 global CommIn put empty into CommIn put empty into cd field "HoldingArea" of cd "Help Card" EnableMenu 2, 2, false end clearClip on closeDiskFile global fn, var,CommIn if fn is empty then exit closeDiskFile end if answer return & "Close file " & quote & fn & quote & " ?" with "No" or "Yes" if it is "Yes" then put fn into tempfn put "" into fn put "" into var put "" into CommIn close file tempfn answer "File" && quote & tempfn & quote && "closed. Trying to write more information to this file will erase its contents." with "OK" EnableMenu 1, 10, false end if end closeDiskFile on compactTheStack answer return & "About to compact the stack:" with "Cancel" or "Proceed" if it is "Proceed" then put msg into temp put "Compacting the stack..." doMenu "Compact Stack" put temp hide msg else exit compactTheStack end if end compactTheStack on convertJournal global JA if char 1 of JA is "J" then if char 1 of JA is "J" and char 2 of JA is "E" and char 3 of JA is "P" then if char 4 of JA is "," then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology" before JA else if char 4 of JA is ":" and char 7 of JA is "L" then put "" into char 9 of JA put "" into char 8 of JA put "" into char 7 of JA put "" into char 6 of JA put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology: Learning, Memory and Cognition" before JA else if char 4 of JA is ":" and char 7 of JA is "G" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology" before JA else if char 4 of JA is ":" and char 8 of JA is "L" then put "" into char 9 of JA put "" into char 8 of JA put "" into char 7 of JA put "" into char 6 of JA put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology: Human Learning and Memory" before JA else if char 4 of JA is ":" and char 8 of JA is "P" then put "" into char 9 of JA put "" into char 8 of JA put "" into char 7 of JA put "" into char 6 of JA put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology: Human Perception and Performance" before JA else if char 4 of JA is ":" and char 7 of JA is "M" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Experimental Psychology" before JA end if else if char 1 of JA is "J" and char 2 of JA is "M" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Memory and Language" before JA else if char 1 of JA is "J" and char 2 of JA is "V" then put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of Verbal Learning and Verbal Behavior" before JA else if char 1 of JA is "J" and char 2 of JA is "A" and char 3 of JA is "S" and char 4 of JA is "A" then put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Journal of the Acoustical Society of America" before JA end if else if char 1 of JA is "M" and char 2 of JA is "&" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Memory and Cognition" before JA else if char 1 of JA is "P" then if char 2 of JA is "&" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Perception and Psychophysics" before JA else if char 7 of JA is "R" then put "" into char 9 of JA put "" into char 8 of JA put "" into char 7 of JA put "" into char 6 of JA put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Psychological Review" before JA else if char 7 of JA is "B" then put "" into char 10 of JA put "" into char 9 of JA put "" into char 8 of JA put "" into char 7 of JA put "" into char 6 of JA put "" into char 5 of JA put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Psychological Bulletin" before JA else if char 2 of JA is "S" and char 3 of JA is "," then put "" into char 2 of JA put "" into char 1 of JA put "Psychological Science" before JA end if else if char 1 of JA is "A" and char 2 of JA is "J" and char 3 of JA is "P" then put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "American Journal of Psychology" before JA else if char 1 of JA is "A" and char 2 of JA is "P" and char 3 of JA is "," then put "" into char 2 of JA put "" into char 1 of JA put "American Psychologist" before JA else if char 1 of JA is "Q" and char 2 of JA is "J" then put "" into char 4 of JA put "" into char 3 of JA put "" into char 2 of JA put "" into char 1 of JA put "Quarterly Journal of Experimental Psychology" before JA end if end if end convertJournal on DoBack global PriorCard if PriorCard is empty or the name of this cd is "Help Card" or PriorCard is "Help Card" then exit DoBack else set cursor to Signal visual effect dissolve go to PriorCard end if end DoBack on DoDeDup answer "Eliminate Duplicates:" & return & "Is the stack sorted by ‘Author’?" with "Cancel" or "No" or "Yes" if it is "Cancel" then exit DoDeDup else if it is "No" then answer return & "Sort cards alphabetically by ‘Author’ and then Eliminate Duplicates?" with "Cancel" or "Proceed" if it is not "Cancel" then sort by field "Author" & field "Title" else exit DoDeDup end if end if global NewC, OldC, NewT, OldT, NewA, OldA put msg into temp put "Searching for possible duplicates... (Command-Period to terminate)" put the number of cds of bkgnd id 30235 into numofcards add -2 to numofcards put 2 into OldC put 3 into NewC put word 1 of bkgnd field "Author" of cd OldC into OldA put word 2 of bkgnd field "Author" of cd OldC after OldA put word 5 of bkgnd field "Author" of cd OldC after OldA put word 1 of bkgnd field "Title" of cd OldC into OldT put word 4 of bkgnd field "Title" of cd OldC after OldT put last word of bkgnd field "Title" of cd OldC after OldT repeat forever set cursor to busy put word 1 of bkgnd field "Author" of cd NewC into NewA put word 2 of bkgnd field "Author" of cd NewC after NewA put word 5 of bkgnd field "Author" of cd NewC after NewA put word 1 of bkgnd field "Title" of cd NewC into NewT put word 4 of bkgnd field "Title" of cd NewC after NewT put last word of bkgnd field "Title" of cd NewC after NewT if NewA = OldA and NewT = OldT then beep go to cd OldC answer return & "This and the next card may be duplicates" with "Show Next" go to cd NewC answer return & "Delete which card?" with "1st" or "2nd" or "Neither" if it is "1st" then go prev DoDeleteThisCard else if it is "2nd" then DoDeleteThisCard end if put msg end if put NewC into OldC put NewA into OldA put NewT into OldT add 1 to NewC if NewC > numofcards then exit repeat end repeat put temp hide msg beep answer return & "End of de-duplicating." with "Ok" end DoDeDup on DoDeleteThisCard answer return & "About to delete this card and erase all of the information permanently:" with "Proceed" or "Cancel" if it is "Proceed" then set cursor to 4 domenu "Delete Card" put the number of cds of bkgnd id 30235 into cd field "number of cards" of cd "Help Card" end if end DoDeleteThisCard on DoMakeNewCard set cursor to 4 doMenu "New Card" put "New" into bkgnd field "Status" get the short date put it into bkgnd field id 82 put the number of cds of bkgnd id 30235 into cd field "number of cards" of cd "Help Card" put "?" into bkgnd field id 73 end DoMakeNewCard on FindIt set cursor to RegFind set lockscreen to true global toBeFound,howToSearch,whereToSearch,PriorCard put the name of this cd into tempPriorCard if toBeFound is empty then EnableMenu 1, 3, false else EnableMenu 1, 3, true end if if whereToSearch is "All" and howToSearch is empty then put "Find" && quote & toBeFound & quote else if whereToSearch is "All" and howToSearch is "whole" then put "Find whole" && quote & toBeFound & quote else if howToSearch is empty and whereToSearch is not "All" then put "Find" && quote & toBeFound & quote && "in field" && whereToSearch else if howToSearch is "whole" and whereToSearch is not "All" then put "Find whole" && quote & toBeFound & quote && "in field" && whereToSearch end if hide msg type return if the short name of this cd is "Help Card" then go next cd type return end if if the result is not empty then put toBeFound into bkgnd field id 80 set lockScreen to false if whereToSearch is "All" then answer return & "There are no occurrences of ‘" & toBeFound & "’ in any field." with "Ok" else answer return & "There are no occurrences of ‘" & toBeFound & "’ in the ‘" & whereToSearch & "’ field." with "Ok" end if EnableMenu 1, 3, false else put toBeFound into bkgnd field id 80 set lockScreen to false global beenThere put the number of this cd into beenThere put tempPriorCard into PriorCard end if end FindIt on helpButton message,msgloc global screensize put msg into temp set cursor to Help if msgloc is not empty and screensize is "Small" then set loc of msg to 22,220 end if put message repeat while the shiftKey is down end repeat put temp hide msg if screensize is "Small" then set loc of msg to 22,300 end helpButton on PreliminaryWriteOut answer return & "Write out articles based on ‘status’ or ‘date’?" with "Cancel" or "Date" or "Status" if it is "Cancel" then exit PreliminaryWriteOut else if it is "Status" then writeOutNewArticles else answer return & "Is the stack sorted by date ?" with "No" or "Yes" if it is "No" then answer return & "The stack must be sorted by date for this procedure to work." with "Ok" exit PreliminaryWriteOut else writeOutByDate end if end if end PreliminaryWriteOut on quickFind set cursor to quickFind hide msg set lockscreen to true global toBeFound,howToSearch,whereToSearch,PriorCard,beenThere if toBeFound is empty then EnableMenu 1, 3, false else EnableMenu 1, 3, true end if set the name of bkgnd button id 79 to whereToSearch put the name of this cd into tempPriorCard put the number of this cd into beenThere go next cd of this bkgnd put empty into bkgnd field id 80 if howToSearch is "whole" then put "Find whole" && quote & toBeFound & quote && "in field" && whereToSearch else put "Find" && quote & toBeFound & quote && "in field" && whereToSearch end if hide msg put bkgnd field id 80 into tempToBeFound put empty into bkgnd field id 80 type return if the short name of this cd is "Help Card" then go next cd type return end if if the result is not empty or the number of this cd is beenThere then put tempToBeFound into bkgnd field id 80 go to tempPriorCard set lockScreen to false beep answer "There are no more occurrences of ‘" & toBeFound & "’ in the field ‘" & whereToSearch & "’." with "Ok" EnableMenu 1, 3, false else put ToBeFound into bkgnd field id 80 set lockScreen to false put tempPriorCard into PriorCard end if end quickFind on readInNewArticles put the number of cds of bkgnd id 30235 into numofcards put "TEXT" into type get Filename(type) if it is empty then exit readInNewArticles else put it into upf end if open file upf repeat forever read from file upf until return if it is not empty then put it into temp DoMakeNewCard add 1 to numofcards put temp into field "Author" read from file upf until return put it into field "Title" read from file upf until return put it into field "Source" read from file upf until return put it into field "Comments" read from file upf until return put it into field "Keywords" put "?" into bkgnd field "Possession" else exit repeat end if end repeat close file upf put "Last Update: " & the short date into cd field "LastUpdated" of cd "Help Card" answer return & "All new information read in." with "Ok" end readInNewArticles on screenCheck global screenSize if screenSize is "small" then hide menuBar end if end screenCheck on sortIt answer return & "Sort cards by ‘Author’ or by ‘DateMade’ ?" with "Other" or "DateMade" or "Author" if it is "DateMade" then put msg into temp put "Sorting by ‘DateMade’..." sort descending datetime by field "DateMade" put temp hide msg exit sortIt else if it is "Author" then put msg into temp put "Sorting by ‘Author’..." sort by field "Author" & field "Title" put temp hide msg exit sortIt else if it is "Other" then answer return & "Sort cards by ‘Source’ or by ‘Status’ ?" with "Cancel" or "Source" or "Status" if it is "Source" then put msg into temp put "Sorting by ‘Source’..." sort by field "Source" put temp hide msg exit sortIt else if it is "Status" then put msg into temp put "Sorting by ‘Status’..." sort by field "Status" put temp hide msg exit sortIt end if end if end sortIt on writeClipOut set cursor to 4 put "Heap o’ Clippings" into shortFile put NewFileName( "Save file as:",(shortFile)) into fn if fn is empty or char 1 of fn is "—" then exit writeClipOut set cursor to 4 if fn is not empty then put cd field "HoldingArea" of cd "Help Card" into temp if temp is empty then answer return & "Cancelled: There is nothing in the special clipboard." else open file fn write temp to file fn close file fn clearClip answer "Special clipboard written to file “" & fn & "” and special clipboard cleared." end if end if end writeClipOut on writeOutByDate set cursor to 4 put "Date Update From" into shortFile put NewFileName( "Save file as:",(shortFile)) into upf if upf is empty or char 1 of upf is "—" then exit writeOutByDate put the short date into temp ask "Enter last date to be included:" with temp if it is empty then exit writeOutByDate else put it into CutOff end if go to cd 2 open file upf convert CutOff to dateItems repeat forever set cursor to busy put field "DateMade" into temp convert temp to dateItems if item 1 of temp >= item 1 of Cutoff and item 2 of temp >= item 2 of Cutoff and item 3 of temp >= item 3 of Cutoff then write first line of field "Author" & return to file upf write first line of field "Title" & return to file upf write first line of field "Source" & return to file upf write first line of field "Comments" & return to file upf write first line of field "Keywords" & return to file upf go next cd of this bkgnd else exit repeat end if end repeat close file upf convert CutOff to short date answer return & "All articles entered on or after" && CutOff && "have been written to the file" && "“" & upf & "”." with "Ok" end writeOutByDate on writeOutNewArticles set cursor to 4 put the number of cds of bkgnd id 30235 into numofcards put "Status Update From" into shortFile put NewFileName( "Save file as:",(shortFile)) into upf if upf is empty or char 1 of upf is "—" then exit writeOutNewArticles open file upf set cursor to busy put "Find" && quote & "New" & quote && "in field" && quote & "Status" & quote hide msg repeat forever type return if the result is not empty then answer return & "All new articles have been written to the file" && "“" & upf & "”." with "Ok" close file upf exit repeat else put "?" into bkgnd field "Status" write first line of field "Author" & return to file upf write first line of field "Title" & return to file upf write first line of field "Source" & return to file upf write first line of field "Comments" & return to file upf write first line of field "Keywords" & return to file upf end if end repeat end writeOutNewArticles